<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="../static/js/bootstrap/css/bootstrap.min.css">
	<script src="../static/js/jquery-2.1.4.min.js"></script>
	<script src="../static/js/jquery.cookie.min.js"></script>
<link rel="stylesheet" href="../static/css/style.css" crossorigin="anonymous">
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="../static/js/bootstrap/js/bootstrap.min.js"></script>
	<script src="../static/js/vue.js"></script>
	<!-- <script src="js/app.js"></script> -->
	<title></title>
	<meta name="description" />
</head>

<body>
	<div class="container text-center"><img width="300px" src="1.png" alt=""></div>
	<div class="container text-center">
		<button type="button" id="ledRedOn" class="btn btn-success btn-lg">红灯开</button>
		<button type="button" id="ledRedOff" class="btn btn-info btn-lg">红灯关</button>
	</div>
	<br>
	<div class="container text-center">
		<button type="button" id="ledYellowOn" class="btn btn-success btn-lg">黄灯开</button>
		<button type="button" id="ledYellowOff" class="btn btn-info btn-lg">黄灯关</button>
	</div>
	<br>
	<div class="container text-center">
		<button type="button" id="ledBlueOn" class="btn btn-success btn-lg">蓝灯开</button>
		<button type="button" id="ledBlueOff" class="btn btn-info btn-lg">蓝灯关</button>
	</div>
	<br>
	<div class="container text-center">
		<button type="button" id="fanOn" class="btn btn-success btn-lg">流水灯</button>
		<button type="button" id="time" class="btn btn-info btn-lg">获时间</button>
	</div>
	<script>
		$(function(){
			$('#ledRedOn').click(function(){
				$.get("http://192.168.31.115:8080/publish?topic=2018A14116/LF&msg=LEDR_ON&iname=602&ipwd=iot");
			});
			$('#ledRedOff').click(function(){
				$.get("http://192.168.31.115:8080/publish?topic=2018A14116/LF&msg=LED_OFF&iname=602&ipwd=iot");
			});
			$('#ledYellowOn').click(function(){
				$.get("http://192.168.31.115:8080/publish?topic=2018A14116/LF&msg=LEDY_ON&iname=602&ipwd=iot");
			});
			$('#ledYellowOff').click(function(){
				$.get("http://192.168.31.115:8080/publish?topic=2018A14116/LF&msg=LED_OFF&iname=602&ipwd=iot");
			});
			$('#ledBlueOn').click(function(){
				$.get("http://192.168.31.115:8080/publish?topic=2018A14116/LF&msg=LEDB_ON&iname=602&ipwd=iot");
			});
			$('#ledBlueOff').click(function(){
				$.get("http://192.168.31.115:8080/publish?topic=2018A14116/LF&msg=LED_OFF&iname=602&ipwd=iot");
			});
			$('#fanOn').click(function(){
				$.get("http://192.168.31.115:8080/publish?topic=2018A14116/LF&msg=LED_RUNON&iname=602&ipwd=iot");
			});
			$('#time').click(function(){
				$.get("http://192.168.31.115:8080/publish?topic=2018A14116/LF&msg=Time_get&iname=602&ipwd=iot");
			});
		});
	</script>
</body>
</html>